package com.syj.collect.utils;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.Gravity;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;

import com.syj.collect.app.R;


public class LoadingDialog extends Dialog {
    public LoadingDialog(Context context) {
        super(context);
    }
    public LoadingDialog(Context context, int themeResId) {
        super(context, themeResId);
    }
    private TextView txt_conentt;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.view_loading);
        txt_conentt=findViewById(R.id.txt_conentt);
        // 设置Dialog参数
        Window window = getWindow();
        WindowManager.LayoutParams params = window.getAttributes();
        params.gravity = Gravity.CENTER;
        window.setAttributes(params);

    }

    public void initText(String title) {
        txt_conentt.setText("正在加载");
    }
}
